-
Notifications
You must be signed in to change notification settings - Fork 14k
miri: use tikv-jemalloc-sys from sysroot
#149252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The Miri subtree was changed cc @rust-lang/miri These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
|
Does this need a perf run? I don't think Miri is tested in |
|
Miri has its own benchmark suite based on hyperfine that you can run with I'd be happy merging this without running any benchmarks. |
| /// | ||
| /// FIXME(madsmtm): This is loaded from the sysroot that was built with the other `rustc` crates | ||
| /// above, instead of via Cargo as you'd normally do. This is currently needed for LTO due to | ||
| /// https://github.com/rust-lang/cc-rs/issues/1613. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also saves the time for building jemalloc again so that seems nice 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, though that's also the case for a bunch of other common dependencies like serde, libc, regex etc. If this is actually a concern, we should work on a way to share dependencies across the board instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tikv-jemalloc has a build script building C dependencies, making it super slow for check builds. That makes it a more worthwhile goal for this than pure Rust crates. Also the allocator is a global singleton after all so using exactly the rustc setup IMO makes a lot of sense.
This allows LTO to work when compiling jemalloc, which should yield a small performance boost, and makes miri's behaviour here match clippy and rustdoc.
ca9e58e to
522e47f
Compare
|
Thanks! LGTM. This does mean we won't usually use jemalloc when developing Miri in its own repo... but CI there tests with @bors r+ rollup |
Note that this then requires |
|
Ah, we may have to |
miri: use `tikv-jemalloc-sys` from sysroot This allows LTO to work when compiling jemalloc (which is currently broken due to rust-lang/cc-rs#1613), which should yield a small performance boost, and makes Miri's behaviour here match Clippy and Rustdoc. Follow-up to rust-lang#148925 / rust-lang#146627 after discussion in rust-lang#148925 (review). r? RalfJung
Rollup of 6 pull requests Successful merges: - #148234 (rustdoc: make mergeable crate info more usable) - #149201 (Add suggest alternatives for Out-of-range \x escapes) - #149208 ([rustdoc] Make more functions return `fmt::Result` and reduce number of `.unwrap()` calls) - #149252 (miri: use `tikv-jemalloc-sys` from sysroot) - #149255 (Use `let...else` consistently in user-facing diagnostics) - #149275 (Fix missing double-quote in `std::env::consts::OS` values) r? `@ghost` `@rustbot` modify labels: rollup
This allows LTO to work when compiling jemalloc (which is currently broken due to rust-lang/cc-rs#1613), which should yield a small performance boost, and makes Miri's behaviour here match Clippy
and Rustdoc.
Follow-up to #148925 / #146627 after discussion in #148925 (review).
r? RalfJung